home *** CD-ROM | disk | FTP | other *** search
- #ifndef CIRCLE_H
- #define CIRCLE_H
-
- // -[Keep_Heading]-
-
-
- // -[Copyright_Mesg]-
- // --------------------------------------------------------------- //
- // (c) Copyright 1993-1994. Step Ahead Software Pty Limited. All rights reserved.
- // Class Name : Circle
- // Designer : Example Writer
- // Filename : CIRCLE.h
- // Description :
- // Circle objects are objects in the system that are shown on the screen
- // as a circle at a location X,Y with a size specified by Radius. Their
- // colour is determined by the protected Colour member in their base
- // class Shape.
- // --------------------------------------------------------------- //
-
- // ==================================================
- // = LIBRARY
- // Step 3 Graphics Example
- // = FILENAME
- // CIRCLE.cpp
- // = RCSID
- // $Id$
- // = AUTHOR
- // Example Writer
- // = COPYRIGHT
- // (c) Copyright 1993-1994. Step Ahead Software Pty Limited. All rights reserved.
- // ==================================================
- #define CC_GEN 1
- #include "SHAPE.h"
-
- #include "genclsid.h"
-
-
- // -[Keep_h_Extras]-
-
-
- // -[Class_Dec]-
- class Circle;
- typedef Circle * PCircle;
- typedef Circle & RCircle;
- typedef Circle * & RPCircle;
- typedef const Circle * PCCircle;
- typedef const Circle & RCCircle;
-
-
- class Circle : public Shape
- // = TITLE
- // Circle
- // = CLASSTYPE
- // Concrete
- // = AUDIENCE
- //
- // = DESCRIPTION
- // Circle objects are objects in the system that are shown on the screen
- // as a circle at a location X,Y with a size specified by Radius. Their
- // colour is determined by the protected Colour member in their base
- // class Shape.
- //
- // = NOTES
- //
- // = SEE ALSO
- // Shape
- {
- // -[Keep_Class_Extras]-
-
-
- // -[Member_Data_Decs]-
- public:
- protected:
-
- // Radius of circle.
- int Radius;
- private:
-
-
- // -[Member_Function_Decs]-
- public:
-
- // Constructs a circle object with the given parameters.
- Circle(int InitX, int InitY, int InitRadius);
-
- // Returns a hash value
- virtual hashValueType hashValue() const;
-
- // Unique class ID
- virtual classType isA() const;
-
- // Tests Equality
- virtual int isEqual(const Object& testObject) const;
-
- // Class Name
- virtual char * nameOf() const;
-
- // Output Class Info
- virtual void printOn(Rostream outputStream) const;
-
- // Draws the circle of radius given in the Radius member.
- virtual void Show(HDC hDC);
- protected:
- private:
-
-
- // -[Persistent_1]-
- // OWL1.0 Streamability
- public:
- Circle(StreamableInit); // Used to create a new object
- static PTStreamable build();
- protected:
- // Reads data in from the stream
- virtual Pvoid read(Ripstream is); // Writes data out to the stream
- virtual void write(Ropstream os);
- private:
- virtual const Pchar streamableName() const;
-
- };
-
- // -[Persistent_2]-
- // OWL1.0 Streamability
- inline Ripstream operator >> ( Ripstream is, RCircle cl )
- { return is >> (RTStreamable)cl; }
- inline Ripstream operator >> ( Ripstream is, RPCircle cl )
- { return is >> (RPvoid)cl; }
- inline Ropstream operator << ( Ropstream os, RCCircle cl )
- { return os << (RTStreamable)cl; }
- inline Ropstream operator << ( Ropstream os, PCCircle cl )
- { return os << (PTStreamable)cl; }
-
-
- // -[Keep]-
-
-
- // -[Global_Data_Decs]-
-
-
- // -[Global_Function_Decs]-
-
- // -[Function_Defs]-
-
- // -[End_Cond]-
- #endif
-